<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const str = '1bb a3b a5b a,b cd12c4+a5-1ab,2ab';

        console.log(str.match(/[0-3a-fA-H]/g));
        console.log(str.match(/[0-9a-zA-z_]/g));// \w
        console.log(str.match(/[0-9]/g));// \d
        console.log(str.match(/[^0-9]/g));// \D
        console.log(str.match(/[^0-9a-zA-z_]/g));// \W
        console.log(str.match(/[^abc]/g));
        console.log(str.match(/[\d\D]/g));// .
        console.log(str.match(/[\w\W]/g));// .





    </script>
</body>

</html>